/*
 * @Author: liuyonghu
 * @Date: 2021-05-17 10:02:24
 * @LastEditTime: 2021-05-25 11:14:58
 * @LastEditors: liuyonghu
 * @Description:
 * @FilePath: \vue2amaptest\src\router\index.js
 */

import Router from "vue-router";
import Vue from "vue";
Vue.use(Router);

// import layout from "../layout";
// const app = require("../App");
// const home = require("../components/home.vue");
// const helloworld = require("../components/HelloWorld.vue");
// debugger;
const routes = [
  //   {
  //     name: "home",
  //     path: "/",
  //     component: layout,
  //     redirect: "/index",
  //     children: [
  //       {
  //         name: "home",
  //         path: "/index",
  //         component: () => import("../components/home"),
  //       },
  //       {
  //         name: "HelloWorld",
  //         path: "/helloword",
  //         component: () => import("../components/HelloWorld"),
  //       },
  //     ],
  //   },

  {
    name: "home",
    path: "/",
    component: () => import("../components/home"),
  },
  {
    name: "HelloWorld",
    path: "/helloword",
    component: () => import("../components/HelloWorld"),
  },
];

export default new Router({
  routes,
});
